import request from '@/utils/request';

// 查询关键字列表
export function listKeyword(query) {
	return request({
		url: '/mall/keyword/list',
		method: 'post',
		data: query,
	});
}

// 查询关键字详细
export function getKeyword(id) {
	return request({
		url: '/mall/keyword/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增关键字
export function addKeyword(data) {
	return request({
		url: '/mall/keyword/add',
		method: 'post',
		data: data,
	});
}

// 编辑关键字
export function updateKeyword(data) {
	return request({
		url: '/mall/keyword/edit',
		method: 'post',
		data: data,
	});
}

// 删除关键字
export function delKeyword(id) {
	return request({
		url: '/mall/keyword/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出关键字
export function exportKeyword(query) {
	return request({
		url: '/mall/keyword/export',
		method: 'post',
		params: query,
	});
}
